package com.codefox.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.codefox.service.TbDrugService;

/**
 * 药品控制层
 * 
 * @author puma
 * @date 2018年10月8日 下午3:06:59
 */
@Controller
@RequestMapping(value = { "back", "front" })
public class TbDrugController {
	// 注入服务层对象
	@Autowired
	TbDrugService service;

	@ResponseBody
	@RequestMapping(value = "listDrug", produces = "application/json;charset=UTF-8")
	public String listDrug() {
		return JSON.toJSONString(service.listDrug());
	}
}
